import { computed, defineComponent } from 'vue'
import { useRoute } from 'vue-router'

import { CouponForm } from '../components'

export default defineComponent({
  name: 'CouponEdit',
  setup() {
    const route = useRoute()

    const isValid = computed(() => !!route.query.isValid)

    return {
      isValid
    }
  },
  render() {
    return (
      <div>
        <CouponForm isEdit isValid={this.isValid} />
      </div>
    )
  }
})
